#!/usr/bin/env python
# -*- coding: utf-8 -*-

import logging
from utils.context import ctx


class RequestIdFilter(logging.Filter):

    def filter(self, record):
        record.request_id = ctx.request.request_id
        return True
